package Java8实战._5_重构_测试_调试._7_1_策略模式;

public class Validator {

    private final ValidationStrategy validationStrategy;


    public Validator(ValidationStrategy validationStrategy){
        this.validationStrategy = validationStrategy;
    }

    public boolean validate(String str){
        return validationStrategy.execute(str);
    }


}

















